package com.consumer.demo.controller;

import com.consumer.demo.constant.MQConstant;
import com.consumer.demo.service.IMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description TODO
 * @Author wuting
 * @Date 2020/5/16 21:18
 **/
@RestController
public class RabbitMQController {




    @Autowired
    private IMessageService iMessageService;

    @GetMapping("send")
    public String send(String text,Long time){
        iMessageService.send(MQConstant.HELLO_QUEUE_NAME,text,time);
        return "发送成功";
    }

}
